//
//  UITextField+MLXExtension.m
//  MLX
//
//  Created by SY on 2018/9/25.
//  Copyright © 2018年 SY. All rights reserved.
//

#import "UITextField+MLXExtension.h"

@implementation UITextField (MLXExtension)
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender{
    SEL cutAction = NSSelectorFromString(@"cut:");
    SEL copyAction = NSSelectorFromString(@"copy:");//
    SEL selectAction = NSSelectorFromString(@"select:");
    SEL selectAllAction = NSSelectorFromString(@"selectAll:");
    SEL pasteAction = NSSelectorFromString(@"paste:");
    if (cutAction == action || copyAction == action || selectAction == action || selectAllAction == action || pasteAction == action) {
        return YES;
    }
    return NO;
}
@end
